<?php
header('Content-Type: text/xml');
print "<?xml version='1.0' encoding='ISO-8859-1'?>";
print "<response><update>";
if ($error == true) print "failed";
else print "completed";
print "</update><msg>" . htmlspecialchars($msg) . "</msg><total>";
print $total;
print "</total><artifact-type>";
print $artifact_type;
print "</artifact-type><artifacts>";
if ($artifacts != null) {
	for ($cntr = 0; $cntr < count($artifacts); $cntr++) {
		$artifact = $artifacts[$cntr];
		print "<artifact><id>";
		print $artifact->artifact_id;
		print "</id><type>";
		print $artifact->artifact_type;
		print "</type><title>";
		print $artifact->title;
		print "</title><description>";
		print $artifact->description;
		print "</description><url>";
		print $artifact->url;
		print "</url><updt_ts>";
		print $artifact->last_update_time;
		print "</updt_ts><visitors>";
		print $artifact->visitor_count;
		print "</visitors><title_img>";
		print $artifact->title_img_url;
		print "</title_img></artifact>";
	}
}
print "</artifacts></response>";
?>
